package com.kgc.scd.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created On : 2022/11/14 0014.
 * <p>
 * Author : shiguangchuan
 * <p>
 * Description: 雪花id工具类
 */
@Component
public class SnowUtil {

    @Autowired
    private SnowFlakeGenerateIdWorker snowFlakeGenerateIdWorker;

    /**
     * @author : shiguangchuan
     * @date   : 2022/11/14 0014
     * @param  :
     * @return :
     * @description : 生成字符串类型id
     */
    public String snowId(){
        String id = snowFlakeGenerateIdWorker.generateNextId();
        return id;
    }

}
